﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/master/CenterMain.Master"
    CodeBehind="Consumption.aspx.cs" Inherits="com.huigo.B2B.Web.center.account.Consumption" %>

<%@ Register Assembly="AspnetPagerV1" Namespace="AspnetPagerV1" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h3 class="greybg">
        消费明细</h3>
    <h4>
        您的可用余额：￥<span id="userFee"><%=GetUserFee() %></span><br />
    </h4>
    <form id="cmnsumptionForm" runat="server" action="Consumption.aspx" method="post"
    class="form-search">
    <label>
        起止日期</label><div class="input-append date" data-date="@DateTime.Now.AddMonths(-1).ToString('yyyy-MM-dd')"
            data-date-format="yyyy-mm-dd">
            <input type="text" name="beginDate" id="beginDate" size="8" data-date-format="yyyy-mm-dd" />
            <span class="add-on"><i class="icon-calendar"></i></span>
        </div>
    &nbsp;-&nbsp;
    <div class="input-append date" data-date="@DateTime.Now.AddMonths(-1).ToString('yyyy-MM-dd')"
        data-date-format="yyyy-mm-dd">
        <input type="text" name="endDate" id="endDate" size="8" data-date-format="yyyy-mm-dd" />
        <span class="add-on"><i class="icon-calendar"></i></span>
    </div>
    &nbsp;&nbsp;
    <select id="type" name="type">
        <option value="1" <%=selected("1") %>>全部</option>
        <option value="2" <%=selected("2") %>>支出</option>
        <option value="3" <%=selected("3") %>>收入</option>
    </select>&nbsp;&nbsp;
    <input type="submit" class="button btn-big btn-orange" value="查询" id="submit" />
    </form>
    <%=Notiy %>
    <asp:Repeater ID="CustFeeFlowContent" runat="server">
        <HeaderTemplate>
            <table class="table table-bordered table-striped responsive-utilities table-hover">
                <thead>
                    <tr>
                        <th>
                            日期
                        </th>
                        <th>
                            消费明细
                        </th>
                        <th>
                            变动金额
                        </th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%#Convert.ToDateTime(Eval("FlowCreatedOn")).ToString("yyyy-MM-dd HH:mm:ss")%>
                </td>
                <td>
                    <%#Eval("FlowMemo")%>
                </td>
                <td class="financial">
                    <%#Convert.ToDecimal(Eval("FlowChangeFee")).ToString("0.00")%>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody></table>
        </FooterTemplate>
    </asp:Repeater>
    <cc1:Pager ID="pageInfo" runat="server" OnPageChanged="pageInfo_PageChanged" PageSize="10"
        PreText="上一页" NextText="下一页" ShowPreNext="true" NumericButtonCount="10" Css="page" />

    <script>
        $(".financial").each(function(index) {
            parseInt($(this).html().trim()) > 0 ? $(this).addClass("green") : $(this).addClass("red");
        });
    </script>

</asp:Content>
